home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / dino / dino_bot.1 / source / shell2 / Makescript < prev    next >
Encoding:
Text File  |  1991-06-14  |  3.4 KB  |  85 lines

  1. #!/bin/sh
  2. # Copyright, 1990, Regents of the University of Colorado
  3. #
  4. # This script is used by the ../source/shell2 Makefile because
  5. # the %&#*&%!@ make program on an iPSC1 won't take a command line
  6. # this long.
  7. #
  8. BIN=$1
  9. LOCAL=$2
  10. INIT=${3:-NONE}
  11. DEST=${4:-NONE}
  12. if test ${INIT} != "NONE" -o "${DEST}" != "NONE"; then
  13.     echo ""
  14.     echo "       checking the back-end configuration files . . ."
  15.     echo ""
  16.     if test ${INIT} = "YES"; then
  17.         echo "          dino2.init"
  18.         if test -s ${BIN}/dino2.init -a \
  19.                             -s ${BIN}/new.init; then
  20.             echo "";
  21.             echo "               WARNING: \"dino2.init\" already exists."
  22.             echo "                        DINO will not overwrite it"
  23.             echo "                        The new \"dino2.init\" file has"
  24.             echo "                        been named \"new.init\""
  25.             echo ""
  26.         else
  27.             if test -s ${BIN}/new.init; then
  28.                 mv ${BIN}/new.init ${BIN}/dino2.init
  29.             else
  30.                 if test -s ${BIN}/dino2.init; then
  31.                     echo ""
  32.                     echo "               WARNING: Something is wrong, the makefile"
  33.                     echo "                        was invoked as if this were a new"
  34.                     echo "                        installation, but there is only an"
  35.                     echo "                        old \"dino2.init\" file."
  36.                     echo "                        DINO may not run properly."
  37.                     echo ""
  38.                 else
  39.                     echo ""
  40.                     echo "               WARNING: File \"dino2.init\" does not exist,"
  41.                     echo "                        DINO will not run properly."
  42.                     echo ""
  43.                 fi
  44.             fi
  45.         fi
  46.     fi
  47.     if test "${DEST}" != "NONE"; then
  48.         for f in ${DEST}; do
  49.             echo "          dino2.$f"
  50.             if test -s ${LOCAL}/dino2.$f -a -s ${LOCAL}/new.$f; then
  51.                 echo ""
  52.                 echo "               WARNING: \"dino2.$f\" already exists."
  53.                 echo "                        DINO will not overwrite it"
  54.                 echo "                        The new \"dino2.$f\" file has"
  55.                 echo "                        been named \"new.$f\""
  56.                 echo ""
  57.             else
  58.                 if test -s ${LOCAL}/new.$f; then
  59.                     mv ${LOCAL}/new.$f ${LOCAL}/dino2.$f
  60.                 else
  61.                     if test -s ${LOCAL}/dino2.$f; then
  62.                         echo ""
  63.                         echo "               WARNING: Something is wrong, the makefile"
  64.                         echo "                        was invoked as if this were a new"
  65.                         echo "                        installation, but there is only an"
  66.                         echo "                        old \"dino2.$f\" file."
  67.                         echo "                        DINO may not run properly."
  68.                         echo ""
  69.                     else
  70.                         echo ""
  71.                         echo "               WARNING: File \"dino2.$f\" does not exist,"
  72.                         echo "                        DINO will not run properly."
  73.                         echo ""
  74.                     fi
  75.                 fi
  76.             fi
  77.         done
  78.     fi
  79. else
  80.     echo ""
  81.     echo "       this is an update, the Automated Installer will"
  82.     echo "            not touch the back-end configuration files."
  83.     echo ""
  84. fi
  85.